<script type="text/javascript">
function goback()
{
	location.href = "<?php echo base_url().'index.php/products/productslist/'.$categoria->id; ?>"
}


</script>
			
			<div class="block small left">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>Nuovo Prodotto in <?php echo $categoria->nome; ?></h2>
					<ul class="tabs">
						<li><?php echo anchor('products/productslist/'.$categoria->id,'Torna alla Categoria'); ?></li>
					</ul>
				</div>		<!-- .block_head ends -->
				
				<div class="block_content">
					

					<?php
						if (isset($_SESSION['user_message'])) {
							echo "<div class='message success'>".$_SESSION['user_message'] . "</div>";
							unset($_SESSION['user_message']);
						}
					?>

					<?php echo form_open('products/product_new/'.$categoria->id); ?>

					<p>
						<label>Nome:</label><br/>
						<input type="text" class="text small" name="nome" value="<?php echo set_value('nome'); ?>"/> 
						<?php echo form_error('nome'); ?>
					</p>
					<p>
						<label>Descrizione:</label><br/>
						<textarea class="wysiwyg" name="descrizione"><?php echo set_value('descrizione');?></textarea> 
						<?php echo form_error('descrizione'); ?>
					</p>
					<p>
						<label>Prezzo:</label><br/>
						<input type="text" class="text small" name="prezzo" value="<?php echo set_value('prezzo'); ?>"/> 
						<?php echo form_error('prezzo'); ?>
					</p>
					<p>
						<input type="checkbox" class="checkbox" checked="<?php echo set_value('inofferta');?>" id="inofferta" name="inofferta"  /> 
						<label for="inofferta">In Offerta ?</label> 
					</p>
					<p>
						<label>Prezzo Offerta:</label><br/>
						<input type="text" class="text small" name="prezzofferta" value="<?php echo set_value('prezzofferta'); ?>"/> 
						<?php echo form_error('prezzofferta'); ?>
					</p>
					<p>
						<input type="checkbox" class="checkbox" checked="<?php echo set_value('nascosto');?>" id="nascosto" name="nascosto"  /> 
						<label for="nascosto">Nascosto ?</label> 
					</p>
					<p>
						<input type="checkbox" class="checkbox" checked="<?php echo set_value('mobile');?>" id="mobile" name="mobile"  /> 
						<label for="mobile">Disponibile su Mobile ?</label> 
					</p>
					<p>
						<input type="checkbox" class="checkbox" checked="<?php echo set_value('visibile');?>" id="visibile" name="visibile"  /> <label for="visibile">Nascosto</label> 
					</p>
					<hr/>
					<p>
						<input type="submit" class="submit small" value="Salva" />
						<input type="button" class="submit small" value="Annulla" onclick="goback()" />
					</p>
					
					<?php form_close(); ?>
				</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
			</div>		<!-- .block ends -->


			<div class="block small right">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>Immagine Prodotto</h2>
				</div>		<!-- .block_head ends -->
				
				<div class="block_content">
					
					<p class="fileupload">
							<label>File input label:</label><br />
							<input type="file" id="fileupload" /><br/>
							<span id="uploadmsg">Max size 3Mb</span>
						</p>
					
					<div id="uploaded_file"></div>

				</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
			</div>		<!-- .block ends -->

			